package com.usian.controller;

import com.usian.pojo.TbItemCat;
import com.usian.service.TbItemCatService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author chen
 * @date 2021/1/9 - 19:13 - 星期六
 * @project usian_parent
 * @package com.usian.controller
 * @by GGbomd猪猪侠
 */
@RestController
public class TbItemCatController {

    @Autowired
    private TbItemCatService tbItemCatService;

    /**
     * 查询分类表 根据父节点查询子节点
     * @param id
     * @return
     */
    @RequestMapping("/selectItemCategoryByParentId")
    public List<TbItemCat> selectItemCategoryByParentId(@RequestParam Long id){
        return tbItemCatService.selectItemCategoryByParentId(id);
    }

}
